package qlsl.androiddesign.fragment.subfragment;

import qlsl.androiddesign.fragment.commonfragment.TabFragment;
import qlsl.androiddesign.view.baseview.FunctionView;
import qlsl.androiddesign.view.subview.fragmentview.JobView;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.qlsl.androiddesign.kuaiwa.R;

public class JobFragment extends TabFragment {

	private JobView functionView;

	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		if (functionView == null) {
			ViewGroup contentView = (ViewGroup) inflater.inflate(
					R.layout.fragment_job, null);
			functionView = new JobView(this, onCreateView(inflater),
					contentView);
		}
		ViewGroup parent = (ViewGroup) functionView.view.getParent();
		if (parent != null) {
			parent.removeView(functionView.view);
		}
		return functionView.view;
	}

	public FunctionView<?> getFunctionView() {
		return functionView;
	}

	public void onTabResume() {

	}

	public void onTabPause() {

	}

	public void onNetWorkSucceed(String method, Object values) {
		if (method.equals("queryJobList")) {
			functionView.showData(values);
		}
	}

}
